package com.regular.model;

import java.sql.Timestamp;
import java.util.List;

public class RegularPathService {

	private RegularPathDAO_interface dao;

	public RegularPathService() {
		dao = new RegularPathDAO();
	}

	public RegularPathVO addRegularPath(String regular_id, String member_id,Timestamp  begin_date,Timestamp end_date) {


		RegularPathVO regularpathVO = new RegularPathVO();
		regularpathVO.setRegular_id(regular_id);
		regularpathVO.setMember_id(member_id);
		regularpathVO.setBegin_date(begin_date);
		regularpathVO.setEnd_date(end_date);
		dao.insert(regularpathVO);

		return regularpathVO;
	}

	public RegularPathVO updateRegularPath(String regular_id, String member_id) {

		RegularPathVO areaVO = new RegularPathVO();

		areaVO.setRegular_id(regular_id);
		areaVO.setMember_id(member_id);
		dao.update(areaVO);

		return areaVO;
	}

	public void deleteEmp(String regular_id, String member_id) {
		dao.delete(regular_id,member_id);
	}

	

	public List<RegularPathVO> getAll() {
		return dao.getAll();
	}
}
